<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>身体健康管理</title>
<%@ include file="/common/meta.jsp" %>
<script src="${ctx}/fusioncharts.com/javascript/FusionCharts.js" type="text/javascript"></script> 
<script src="${ctx}/js/health/proposal.js" type="text/javascript"></script> 
<script language=JavaScript1.2 src="${ctx}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<script type="text/javascript"> 
	$(document).ready(function(){
	    clinicChart();
	    clinicPineChart();
		clinicLineChart();
	});
	function clinicPineChart(){
	    $.getJSON('health-proposal!getClinicPineChartByIdNumber.action',{idNumber:$("#idNumber").val()}, function(json) {
			 var myChart = new FusionCharts("${ctx}/fusioncharts.com/flash/Pie3D.swf", "myChartId1", "400", "200", "0", "0" );
			 myChart.setDataXML(json);
		     myChart.render("clinic");  
	    }); 
	}
	
	function clinicLineChart(){
	    $.getJSON('health-proposal!getClinicLineChartByIdNumber.action',{idNumber:$("#idNumber").val()}, function(json) {
			 var myChart = new FusionCharts("${ctx}/fusioncharts.com/flash/MSLine.swf", "myChartId2", "240", "200", "0", "0" );
			 myChart.setDataXML(json);
		     myChart.render("lineChart");  
	    }); 
	}
	
	function clinicChart(){
	    $.getJSON('health-proposal!getChartByIdNumber.action',{idNumber:$("#idNumber").val()}, function(json) {
			 var myChart = new FusionCharts("${ctx}/fusioncharts.com/flash/MSLine.swf", "myChartId2", "240", "200", "0", "0" );
			 myChart.setDataXML(json);
		     myChart.render("hwbChart");  
	    }); 
	}
</script>
<style type="text/css">
#customers
  {
  font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
  border-collapse:collapse;
  }

#customers td, #customers th 
  {
  font-size:1em;
  border:1px solid #98bf21;
  padding:3px 7px 2px 7px;
  }

#customers th 
  {
  font-size:1.1em;
  text-align:left;
  padding-top:5px;
  padding-bottom:4px;
  text-align:center;
  background-color:#A7C942;
  color:#ffffff;
  }

#customers tr.alt td 
  {
  color:#000000;
  background-color:#EAF2D3;
  }
</style>
</head>
<body>
<table width="80%" align="center" class="noborder">
	<tr>
	    <td align="left" ><div style="font-family:Arial;font-size:15px;font-weight:bold;font-style:normal">当前位置：健康管理--身体健康管理</div> </td>
	</tr>
</table>
<p/>
<form id="proposalInputForm">
<input type="hidden" name="page.pageNo" id="pageNo" value="${page.pageNo}"/>
<table width="80%" align="center"  class="noborder">
    <tr>
        <td width="10%" align="left">工号/学号:</td>
        <td width="20%"  align="left"><input type="text" id="idNumber" name="idNumber" value="${idNumber}" size="20"/></td>
        <td width="10%"  align="left">姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名:</td>
        <td width="20%" align="left" ><input name="name"  value="${name}" type="text"/></td>
        <td width="10%"  align="right">性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别:</td>
     	<td width="20%" align="right"><input name="sex" value="${sex}"  type="text"/></td>
    </tr>
	<tr>
	    <td width="10%" align="left">年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;级:</td>
        <td width="20%"  align="left"><input name="grade" value="${grade}" type="text"/></td>
        <td width="10%"  align="left">班&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;级:</td>
        <td width="20%" align="left" ><input name="clas" value="${clas}" type="text"/></td>
        <td width="10%"  align="right">班&nbsp;&nbsp;主&nbsp;任:</td>
     	<td width="20%" align="right"><input  value="${teacher}" type="text"/></td>
	</tr>
	<tr>
        <td width="10%" align="left">起始时间:</td>
        <td width="20%"  align="left"><input type="text" id="startDate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" readonly="readonly" name="startDate" value="<s:date name='startDate' format='yyyy-MM-dd'/>"/></td>
        <td width="10%"  align="left">结束时间:</td>
        <td width="20%"  align="left" ><input type="text" id="endDate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})"  readonly="readonly"  name="endDate" value="<s:date name='endDate' format='yyyy-MM-dd'/>"/></td>
        <td width="10%"  align="center"></td>
     	<td width="20%"  align="right"><input type="button" onclick="onClickSearch()" id="searchButton" value="查询" />&nbsp;&nbsp;&nbsp;&nbsp;<s:reset value="重置" theme="simple" /></td>
	</tr>
	<tr>
	    <td width="10%" align="left"></td> 
        <td width="20%" align="left"></td>
     	<td align="right" ></td>
	</tr>
</table>
<p/>
<table width="80%" border="1" id="customers" align="center"  >
			<tr>
			    <th>操作</th>
				<th>职工号/学号</th>
				<th>姓名</th>
				<th>身高</th>
				<th>身高标准</th>
				<th>体重</th>
				<th>体重标准</th>
				<th>BMI</th>
				<th>BMI标准</th>
			</tr>
			<s:iterator value="list" var="q" status="st">
				<tr>
				    <td><input type="checkbox" id="idNumbers" value="${peInfor.person.idNumber}"  name="idNumbers"/></td>
					<td>${peInfor.person.idNumber}&nbsp;</td>
					<td>张三&nbsp;</td>
					<td>${examResult}</td>   
					<td>${referenceStd}</td>
					<td>${explanation}</td>
					<td>${specimenNo}</td>
					<td>${qualitation}</td>
					<td>${unit}</td>
			</tr>
			</s:iterator>
		</table>
<p/>
<table width="80%" align="center"  class="noborder" >
         <tr>
			   <td  align="right"> <div id="hwbChart"></div></td>
			   <td  align="right"> <div id="clinic"></div></td>
			   <td  align="right"> <div id="lineChart"></div></td>
		</tr>
</table>
<p/>
<security:authorize ifNotGranted="ROLE_查阅统计报表">
<table width="80%" align="center"  class="noborder" >
		<tr>
			   <td width="80%" rowspan="2" valign="top">
				   <div>
						<fieldset title=""><legend title="" align="top">营养健康建议:</legend>
                          <s:textarea  name="pageProposal" id="pageProposal" value="%{pageProposal}" rows="3" theme="simple" cols="100"></s:textarea>
			   			</fieldset>    
				  </div> 
			   </td>
			   <td  valign="bottom" align="right"><input type="button" onclick="onClickSave()"  value="发送" /></td>
		</tr>
		<tr>
			   <td  valign="bottom"  align="right"><input type="button" onclick="onClickClear()" value="清空" /></td>
		</tr>
</table>
</security:authorize>
</form>
</body>
</html>